#ifndef DependencyEncoder2OSibling_H
#define DependencyEncoder2OSibling_H
#include "DependencyEncoder.h"
#include "DependencyPipe2OSibling.h"

class DependencyEncoder2OSibling : public DependencyEncoder{
public:
	DependencyEncoder2OSibling(int maxLength, DependencyPipe *pipe, char *trainforest, Parameters *param);
	virtual ~DependencyEncoder2OSibling();
	virtual double gradient(long double *expected, int length);

protected:
	vector<vector<vector<double> > > probs_trips;
	vector<vector<vector<double> > > probs_sibs;

	virtual int getKey(int s, int t, int dir, int comp, int length);
	virtual double getZ(int length, double *beta);
	virtual void inside_outside(int length, double *beta, double *alpha);
	virtual void getExpected(long double *expected, double *beta, double *alpha, double z, int length);
};

#endif